@charset "UTF-8";
body {
  background-color: var(--background);
}

.wrapper {
  display: -ms-grid;
  display: grid;
  margin: 0;
  position: fixed;
  /* dont change it, vh does not work on mobiles with bottom footer */
  top: 30px;
  right: 0;
  left: 0;
  bottom: 5px;
  height: auto;
  overflow: hidden;
  -ms-grid-rows: auto 1fr;
  grid-template-rows: auto 1fr;
  -ms-grid-columns: auto 1fr auto;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "submenu submenu submenu" "sidebar_left main sidebar_right";
}

.toggle {
  cursor: pointer;
}

.hidden {
  display: none;
}

.center {
  text-align: center;
}

.pointer {
  cursor: pointer;
}

.clear {
  clear: both;
}

.displayBlock {
  display: block;
}

.bold {
  font-weight: bold;
}

.left {
  float: left;
}

.right {
  float: right;
}

.grey {
  color: grey;
}

.noselect {
  -webkit-touch-callout: none;
  /* iOS Safari */
  -webkit-user-select: none;
  /* Safari */
  -khtml-user-select: none;
  /* Konqueror HTML */
  -moz-user-select: none;
  /* Firefox */
  -ms-user-select: none;
  /* Internet Explorer/Edge */
  user-select: none;
  /* Non-prefixed version */
}

.block {
  position: relative;
  background-color: rgba(255, 255, 255, 0.2);
  background-color: var(--block-background-color);
  border: 1px solid rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color);
  margin-bottom: 5px;
  user-select: none;
  border-radius: 4px;
}

.sidebar_right .block {
  background-color: #68727b;
  background-color: var(--block-background-color);
  border-bottom: none;
  box-shadow: 0 -2px 0 0 var(--header-background-color) inset;
}

.block:last-child {
  margin-bottom: 0;
}

.block h2 {
  position: relative;
  padding: 4px 5px 4px 6px;
  margin: 0;
  font-size: 100%;
  font-weight: normal;
  background-color: rgba(255, 255, 255, 0.3);
  background-color: var(--header-background-color);
  border-bottom: #555;
  border-radius: 4px 4px 0 0;
}

.block.toggled h2, .block h2.toggled:after {
  border: none;
}

.block h2.toggle:before {
  /* icon */
  position: absolute;
  content: "";
  width: 0;
  height: 0;
  right: 10px;
  top: 10px;
  border-style: solid;
  border-width: 0 4px 5px 4px;
  border-color: transparent transparent var(--text-color-muted) transparent;
}

.block h2.toggled:before {
  /* icon */
  border-width: 5px 4px 0 4px;
  border-color: var(--text-color-muted) transparent transparent transparent;
}

.block .content {
  padding: 7.5px 5px;
}

.block_section {
  margin: 0.75rem 0;
}

.block_section:first-child {
  margin-top: 0;
}

.block_section:last-child {
  margin-bottom: 0;
}

.error {
  padding: 20px;
  margin: 10px;
  border: 1px solid #ff0000;
  background-color: #ffffff;
  width: 500px;
  font-weight: bold;
}

/* color chooser */
body .sp-replacer {
  width: 100%;
  height: 40px;
}

body .sp-preview {
  width: calc(100% - 20px);
  height: 100%;
}

/* ========== header ======================================================== */
.logo {
  position: relative;
  display: inline-block;
  height: 30px;
  width: 110px;
  padding: 5px 5px 5px 36px;
  margin: 5px;
  font-size: 14px;
  text-decoration: none;
  font-weight: bold;
  color: #ffffff;
  color: var(--text-color);
}

.logo:after {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  width: 31px;
  height: 30px;
  background: url("./images/logo.svg") no-repeat center center;
  background-size: auto 28px;
  filter: var(--mobile-menu-toggle-filter);
}

.logo:hover:after {
  left: 2px;
}

.about-logo {
  margin-left: 22%;
}

.about-name {
  font-size: 15px;
  font-weight: bold;
}

.undo_button {
  display: flex;
  align-items: center;
  position: relative;
  width: 60px;
  height: 34px;
  top: 0;
  border: 0;
  outline: none;
  cursor: pointer;
  background-size: auto 25px;
  margin-right: 10px;
}
.undo_button .icon {
  display: inline-block;
  margin-right: 5px;
  width: 10px;
  height: 10px;
  filter: var(--mobile-menu-toggle-filter);
  background: url(./images/icons/undo.svg) no-repeat center center;
  background-size: 100%;
}

.undo_button:hover {
  background-color: transparent;
}

@media screen and (max-width: 700px) {
  .undo_button {
    display: block;
  }
}
/* ========== sub-header ==================================================== */
.submenu {
  -ms-grid-row: 1;
  -ms-grid-column: 1;
  -ms-grid-column-span: 3;
  grid-area: submenu;
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.2);
  background-color: var(--section-background-color);
  overflow: hidden;
}

.attributes {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  margin: 5px;
  margin-bottom: 5px !important;
  padding: 3px 10px 3px 10px;
  border: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  min-height: 34px;
}

.attributes .item {
  display: inline-flex;
  align-items: center;
  margin-right: 8px;
  color: #cbcbcb;
}

.attributes .item > label {
  margin: 0 0.5rem 0 0;
}

.attributes input[type=number] {
  width: 60px;
  margin-right: 5px;
}

.attributes input[type=color] {
  cursor: pointer;
  padding: 0;
  border: 0.2rem solid var(--input-background-color);
  width: 3rem;
}

.attributes .item > button:not(.ui_icon_button) {
  display: inline-block;
  padding: 3px 10px;
}

/* ========== left sidebar ================================================== */
.sidebar_left {
  -ms-grid-row: 2;
  -ms-grid-column: 1;
  grid-area: sidebar_left;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  background-color: var(--section-background-color);
  padding: 0 5px 5px 0;
  margin-right: 5px;
  align-self: start;
  width: 58px;
  overflow: auto;
  max-height: 100%;
}
.sidebar_left::-webkit-scrollbar {
  height: 0;
  width: 0;
}
.sidebar_left .item {
  position: relative;
  display: block;
  background-color: var(--area-background-color);
  width: 48px;
  margin: 5px 0 0 5px;
  overflow: hidden;
  cursor: pointer;
  border-radius: 4px;
}
.sidebar_left .item::before {
  content: "";
  display: block;
  height: 36px;
  width: 48px;
  filter: var(--menu-icons-filter);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 27px;
}
.sidebar_left .item span {
  display: block;
  text-align: center;
  white-space: nowrap;
  line-height: 1.6;
  font-size: 12px;
}
.sidebar_left .item:hover {
  background-color: var(--background-color-hover);
}
.sidebar_left .item.active {
  background-color: var(--background-color-active);
}
.sidebar_left .item.active::before {
  filter: var(--menu-icons-filter-active);
}

/*
IMPORTANT: any new icon should also must be added on /service-worker.js + its version should be updated - FEATURE DISABLED
 */
.sidebar_left .select:before {
  background-image: url("./images/icons/select.svg");
}

.sidebar_left .selection:before {
  background-image: url("./images/icons/selection.svg");
}

.sidebar_left .inpaint:before {
  background-image: url("./images/icons/inpaint.svg");
}

.sidebar_left .slide_rotate:before {
  background-image: url("./images/icons/slide_rotate.svg");
}

.sidebar_left .brush:before {
  background-image: url("./images/icons/brush.svg");
}

.sidebar_left .pencil:before {
  background-image: url("./images/icons/pencil.svg");
}

.sidebar_left .pick_color:before {
  background-image: url("./images/icons/pick_color.svg");
}

.sidebar_left .erase:before {
  background-image: url("./images/icons/erase.svg");
}

.sidebar_left .magic_erase:before {
  background-image: url("./images/icons/magic_erase.svg");
}

.sidebar_left .fill:before {
  background-image: url("./images/icons/fill.svg");
}

.sidebar_left .media:before {
  background-image: url("./images/icons/media.svg");
}

.sidebar_left .shape:before {
  background-image: url("./images/icons/shape.svg");
}

.sidebar_left .text:before {
  background-image: url("./images/icons/text.svg");
}

.sidebar_left .gradient:before {
  background-image: url("./images/icons/gradient.png");
  filter: none;
}

.sidebar_left .clone:before {
  background-image: url("./images/icons/clone.svg");
}

.sidebar_left .seal:before {
  background-image: url("./images/icons/clone.svg");
}

.sidebar_left .crop:before {
  background-image: url("./images/icons/crop.svg");
}

.sidebar_left .blur:before {
  background-image: url("./images/icons/blur.svg");
}

.sidebar_left .sharpen:before {
  background-image: url("./images/icons/sharpen.svg");
}

.sidebar_left .desaturate:before {
  background-image: url("./images/icons/desaturate.svg");
}

.sidebar_left .bulge_pinch:before {
  background-image: url("./images/icons/bulge_pinch.svg");
}

.sidebar_left .animation:before {
  background-image: url("./images/icons/animation.svg");
}

.sidebar_left .denoise:before {
  background-image: url("./images/icons/denoise.svg");
}

.sidebar_left .text_deepen:before {
  background-image: url("./images/icons/text_deepen.svg");
}

.sidebar_left .background_removal:before {
  background-image: url("./images/icons/background_removal.svg");
}

@media screen and (max-width: 550px) {
  #sidebar_left {
    left: -110px;
  }
}
/* ========== right sidebar ================================================= */
.sidebar_right {
  -ms-grid-row: 2;
  -ms-grid-column: 3;
  grid-area: sidebar_right;
  z-index: 2;
  display: flex;
  flex-direction: column;
  transition: 0.2s;
  overflow-x: hidden;
  overflow-y: scroll;
  margin: 0 5px;
  width: 200px;
}

.sidebar_right.active {
  right: 0 !important;
}

.sidebar_right .block.layers {
  flex: 1;
}

.sidebar_right .block.layers .content {
  padding-bottom: 25px;
}

/* preview */
.canvas_preview_wrapper {
  position: relative;
  min-height: 100px;
  margin: 5px 5px 10px 5px;
}

.canvas_preview_details {
  padding: 0 5px;
}

.canvas_preview_details button {
  margin: 0;
}

.preview canvas {
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

.details input {
  padding: 5px 10px;
}

/* color */
.color_area {
  border: 1px solid #444;
  width: calc(100% - 10px);
  height: 40px;
  cursor: pointer;
  margin: 5px;
}

/* layers */
.layers_list {
  margin-top: 10px;
}

.layers_arrow {
  display: inline-block;
  float: right;
  margin-left: 5px;
  padding: 1px 8px;
  border: 1px solid #444;
  border-color: var(--border-color);
  text-decoration: none;
  color: var(--text-color);
  font-size: 12px;
}

.layer_add {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 10px;
  background-color: #419147;
  background-color: var(--background-color-active);
  border: 1px solid #444;
  border-color: var(--border-color);
  color: var(--text-color-active);
  cursor: pointer;
  text-decoration: none;
}

.layer_icon {
  display: inline-block;
  padding: 1px 3px;
  margin-right: 2px;
  color: #fff;
  background-color: #419147;
  background-color: var(--background-color-active);
  border: 1px solid #444;
  border-color: var(--border-color);
  color: var(--text-color-active);
  cursor: pointer;
  text-decoration: none;
}
.layer_icon::before {
  content: "";
  height: 20px;
  width: 20px;
  display: block;
}
.layer_icon.layer_text {
  color: var(--text-color);
  font-size: 13px;
  padding: 1px 5px;
  vertical-align: top;
  line-height: 20px;
  font-size: 13px;
}
.layer_icon.layer_text::before {
  display: none;
}
.layer_icon.layer_duplicate::before {
  background: url("./images/icons/copy.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_new::before {
  background: url("./images/icons/add.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_raster::before {
  background: url("./images/icons/image.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_top::before {
  background: url("./images/icons/arrow-top.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_bottom::before {
  background: url("./images/icons/arrow-bottom.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_subtract::before {
  background: url("./images/icons/subtract.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.layer_plus::before {
  background: url("./images/icons/plus.svg") center no-repeat;
  background-size: 18px;
}
.layer_icon.small::before {
  height: 16px;
  width: 16px;
  background-size: 14px;
}
.layer_icon.small.layer_text {
  line-height: 16px;
  font-size: 12px;
}

.layers_list .item {
  margin-bottom: 2px;
}

.layers_list .layer_name {
  display: block;
  padding: 1px 5px 3px 5px;
  height: 19px;
  width: calc(100% - 44px);
  text-align: left;
  overflow: hidden;
  background-color: #989898;
  background-color: var(--area-background-color);
  border: 1px solid #393939;
  border-color: var(--border-color);
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-color);
  white-space: nowrap;
}

.layers_list .item.shorter .layer_name {
  width: calc(100% - 63px);
}

.layers_list .item.active .layer_name {
  background-color: var(--background-color-active);
  color: var(--text-color-active);
}

.layers_list .arrow_down {
  position: relative;
  float: left;
  margin-right: 5px;
  width: 10px;
  height: 19px;
  opacity: 0.4;
}

.layers_list .arrow_down:after {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  filter: var(--menu-icons-filter);
  background: url("./images/icons/arrow-down.svg") no-repeat center center;
  background-size: 12px auto;
}

.layers_list .visibility {
  position: relative;
  float: left;
  cursor: pointer;
  padding: 0px 3px 0px 3px;
  margin-right: 5px;
  width: 20px;
  height: 19px;
  opacity: 0.1;
  border: none;
  background: transparent;
  box-shadow: none;
}

.layers_list .visibility:after {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  filter: var(--menu-icons-filter);
  background: url("./images/icons/view.svg") no-repeat center center;
  background-size: 18px auto;
}

.layers_list .visible {
  opacity: 0.4;
}

.layers_list .delete {
  float: right;
  cursor: pointer;
  padding: 0px 3px 0px 3px;
  width: 12px;
  height: 19px;
  margin-left: 5px;
  background: transparent url("./images/icons/delete.svg") no-repeat center center;
  background-size: 10px 10px;
  border: none;
  box-shadow: none;
}

/* filters */
.layers_list .filters {
  margin-bottom: 5px;
}

.layers_list .filter {
  margin-bottom: 2px;
  margin-left: 30px;
  opacity: 0.7;
}

.layers_list .filter .layer_name {
  position: relative;
}

.layers_list .filter .layer_name:after {
  position: absolute;
  content: "fx";
  right: -4px;
  top: 1px;
  bottom: 0;
  width: 20px;
}

.sidebar_right .label {
  display: inline-block;
}

.info .toggle.toggled {
  margin-bottom: -3px;
}

.block.details .row {
  clear: both;
  margin-bottom: 4px;
  min-height: 23px;
}

.block.details input[type=number] {
  width: 70px;
  padding: 3px 5px;
  float: right;
}

.block.details .ui_color_input {
  width: 70px;
  float: right;
}

.block.details .ui_color_input input {
  width: 100%;
  height: 23px;
}

.block.details button.ui_toggle_button {
  width: 90px;
  float: right;
}

.block.details select {
  width: calc(100% - 70px);
  height: 23px;
  float: right;
}

.block.details button {
  width: calc(100% - 70px);
  height: 23px;
  border: 1px solid #444;
}

.block.details button.reset {
  position: relative;
  width: 25px;
  float: right;
  margin-right: 3px;
  overflow: hidden;
  opacity: 0.5;
  color: transparent;
}

.block.details button.reset:after {
  position: absolute;
  content: "";
  left: 0;
  top: 0;
  bottom: 0;
  right: 0;
  background: url("./images/icons/refresh.svg") no-repeat center center;
  background-size: auto 14px;
  filter: var(--menu-icons-filter);
}

.block.details button.active {
  background-color: var(--background-color-active);
  color: var(--text-color-active);
}

.details-content {
  height: 206px;
  overflow-y: auto;
}

/* ========== content ======================================================= */
.ruler_left {
  display: none;
  position: absolute;
  left: 0;
  top: 20px;
  background-color: #ccc;
}

.ruler_top {
  display: none;
  position: absolute;
  left: 20px;
  top: 0;
  background-color: #ccc;
}

.middle_area {
  position: relative;
  -ms-grid-row: 2;
  -ms-grid-column: 2;
  grid-area: main;
}

.main_wrapper {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.middle_area.has-ruler .main_wrapper {
  top: 20px;
  left: 20px;
}

.canvas_wrapper {
  position: relative;
}
.canvas_wrapper.raster {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
}
.canvas_wrapper.raster canvas {
  height: 100%;
  width: 100%;
}

.canvas_wrapper canvas {
  position: absolute;
  box-sizing: content-box;
  font-kerning: normal !important;
}

#mouse {
  position: absolute;
  pointer-events: none;
  left: -9999px;
  top: -9999px;
  width: 10px;
  height: 10px;
  z-index: 10;
  border: 2px solid rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

#mouse.circle {
  border-radius: 50%;
}

.transparent-grid {
  width: 100%;
  height: 100%;
  position: absolute;
  pointer-events: none;
  /*background: url(./images/icons/grid.png) repeat top left;*/
  background: url("") repeat top left;
  z-index: 1;
  image-rendering: pixelated;
  /* disable antialiasing */
}

.transparent-grid.white {
  background: white;
}

.transparent-grid.green {
  background: #5be471;
}

.transparent-grid.grey {
  background: #dfdfdf;
}

.transparent-grid.gray {
  background: url("./images/square-bg.png") repeat top left;
  background-size: 40px 40px;
}

canvas {
  position: relative;
  z-index: 2;
}

#canvas_back {
  position: absolute;
  background-color: #ffffff;
  outline: none;
}

#canvas_grid {
  pointer-events: none;
}

.group {
  border: 1px solid #999999;
  margin: 5px 0px 5px 0px;
  padding: 5px 8px;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}

.flex-container .item {
  flex: auto;
  margin: 2px 0;
  width: 150px;
}

.flex-container .item:empty {
  height: 0;
  border: none;
}

.alertify-notifier {
  color: black;
}

.effectsPreview {
  cursor: pointer;
  background-color: #ddd;
}

@media screen and (max-width: 550px) {
  .canvas_wrapper {
    margin-left: 0px;
  }
}
/* ========== dialogs ======================================================= */
#dialog_color_picker_group {
  width: 60%;
}

#dialog_color_channel_group {
  width: 40%;
  margin-left: 1rem;
}

@media screen and (max-width: 450px) {
  #dialog_color_picker .ui_flex_group {
    flex-wrap: wrap;
  }

  #dialog_color_picker_group {
    width: 100%;
  }

  #dialog_color_channel_group {
    width: 100%;
    margin-left: 0;
    margin-top: 1rem;
  }
}
/* ========== navigate ================================================= */
.suspend-menu {
  position: fixed;
  right: 0;
  top: 0;
  z-index: 111;
  display: flex;
  align-items: center;
  height: 30px;
  padding: 0 8px;
}

.suspend-menu-expand {
  filter: var(--mobile-menu-toggle-filter);
  background: url("./images/icons/menu.svg") no-repeat center center;
  background-size: auto 16px;
  display: inline-block;
  height: 24px;
  width: 30px;
  margin-left: 10px;
}

.navigate-base {
  display: none;
  align-items: center;
}

.canvas_navigate_details .details + .details {
  margin-top: 5px;
}

.navigate_compare {
  font-size: 13px;
  padding: 1px 5px;
  vertical-align: top;
  line-height: 22px;
  font-size: 13px;
  vertical-align: top;
}

.navigate_pager {
  margin: 0 5px;
  line-height: 26px;
}

.navigate_name {
  margin-bottom: 3px;
}

.dialog_compare {
  position: fixed;
  background: var(--background);
  display: flex;
  justify-content: center;
}
.dialog_compare::before {
  content: "";
  position: absolute;
  left: 50%;
  margin-left: -1px;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--border-color);
}

.compare_close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 8;
}

.compare_wrapper {
  flex-grow: 1;
  min-width: 0;
  width: 50%;
  height: 100%;
  position: relative;
}
.compare_wrapper.loading::after {
  content: "加载中，请稍候...";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color);
}

.tool-radio-wrapper {
  display: inline-flex;
  align-items: center;
}

.tool-radio-group {
  display: flex;
  align-items: center;
  color: #fff;
  background-color: #3a3e40;
  border-radius: 3px;
  font-size: 13px;
}

.tool-radio {
  margin: 0;
  padding: 4px 8px;
  cursor: pointer;
  transition: 0.2s;
  line-height: 19px;
}
.tool-radio.active {
  background-color: #191d1e;
  color: var(--text-color-active);
  cursor: default;
}
.tool-radio.active:hover {
  background-color: #191d1e;
}
.tool-radio:first-child {
  border-radius: 3px 0 0 3px;
}
.tool-radio:last-child {
  border-radius: 0 3px 3px 0;
}
.tool-radio:hover {
  background-color: #575b5e;
}

.tool-radio-input {
  display: none;
}

.tool-radio-tips,
.tool-radio-key {
  line-height: 21px;
}

.tool-radio-tips {
  margin-left: 10px;
  color: #ababab;
}

.tool-text-tips {
  color: #ababab;
}